<?php defined('_JEXEC') or die('Restricted access'); ?>
<form action="index.php" method="post" name="adminForm">
    <div id="editcell">
        <table class="adminlist">
            <thead>
                <tr>
                    <th width="5">
                        <?php echo JText::_( 'ID' ); ?>
                    </th>
                    <th width="20">
                        <input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count( $this->items ); ?>);" />
                    </th>                    
                    <th>
                        <?php echo JText::_( 'Name' ); ?>
                    </th>
                    <th>
                        <?php echo JText::_( 'Alias' ); ?>
                    </th>
                    <th>
                        <?php echo JText::_( 'Link' ); ?>
                    </th>                    
                    <th>
                        <?php echo JText::_( 'Checked' ); ?>
                    </th>

                </tr>
            </thead>
            <?php
            $k = 0;
            for ($i=0, $n=count( $this->items ); $i < $n; $i++) {
                $row = &$this->items[$i];
                $checked 	= JHTML::_('grid.id',   $i, $row->id );
                $link 		= JRoute::_( 'index.php?option=com_render&controller=render&task=edit&cid[]='. $row->id );
                ?>
            <tr class="<?php echo "row$k"; ?>">
                <td>
                        <?php echo $row->id; ?>
                </td>
                <td>
                        <?php echo $checked; ?>
                </td>                
                <td>
                    <a href="<?php echo $link; ?>"><?php echo $row->name; ?></a>
                </td>
                <td>
                    <a href="<?php echo $link; ?>"><?php echo $row->alias; ?></a>
                </td>
                <td>
                    <a href="<?php echo $link; ?>"><?php echo $row->link_url; ?></a>
                </td>
                <td>
                    <a href="<?php echo $link; ?>"><?php echo $row->checked ; ?></a>
                </td>                
            </tr>
                <?php
                $k = 1 - $k;
            }
            ?>
        </table>
        <table>
            <tr>
                <td colspan="8"  align="center"><?php echo $this->pagination->getListFooter(); ?></td>
            </tr>
        </table>
    </div>

    <input type="hidden" name="option" value="com_render" />
    <input type="hidden" name="task" value="" />
    <input type="hidden" name="boxchecked" value="0" />
    <input type="hidden" name="controller" value="render" />
</form>
